package com.dldata.devtools30.entity;

import jakarta.persistence.*;

import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "devt_api_log")
public class DevtApiLogEntity {
    private Timestamp cdate;
    private String estatus;
    private String jsondata;
    private String strsql;
    private String subid;
    private String subdm;
    private String subname;
    private String errorinfo;
    private long id;
    
    @Basic
    @Column(name = "subdm", nullable = true)
    public String getSubdm() {
        return subdm;
    }
    
    public void setSubdm(String subdm) {
        this.subdm = subdm;
    }
    
    @Basic
    @Column(name = "subname", nullable = true)
    public String getSubname() {
        return subname;
    }
    
    public void setSubname(String subname) {
        this.subname = subname;
    }
    
    @Basic
    @Column(name = "errorinfo", nullable = true)
    public String getErrorinfo() {
        return errorinfo;
    }
    
    public void setErrorinfo(String errorinfo) {
        this.errorinfo = errorinfo;
    }
    
    @Basic
    @Column(name = "cdate", nullable = true)
    public Timestamp getCdate() {
        return cdate;
    }
    
    public void setCdate(Timestamp cdate) {
        this.cdate = cdate;
    }
    
    @Basic
    @Column(name = "estatus", nullable = true, length = 255)
    public String getEstatus() {
        return estatus;
    }
    
    public void setEstatus(String estatus) {
        this.estatus = estatus;
    }
    
    @Basic
    @Column(name = "jsondata", nullable = true, length = 2147483647)
    public String getJsondata() {
        return jsondata;
    }
    
    public void setJsondata(String jsondata) {
        this.jsondata = jsondata;
    }
    
    @Basic
    @Column(name = "strsql", nullable = true, length = 2147483647)
    public String getStrsql() {
        return strsql;
    }
    
    public void setStrsql(String strsql) {
        this.strsql = strsql;
    }
    
    @Basic
    @Column(name = "subid", nullable = true, length = 255)
    public String getSubid() {
        return subid;
    }
    
    public void setSubid(String subid) {
        this.subid = subid;
    }
    
    @Id
    @Column(name = "id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public long getId() {
        return id;
    }
    
    public void setId(long id) {
        this.id = id;
    }
    
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DevtApiLogEntity that = (DevtApiLogEntity) o;
        return id == that.id && Objects.equals(cdate, that.cdate) && Objects.equals(estatus, that.estatus) && Objects.equals(jsondata, that.jsondata) && Objects.equals(strsql, that.strsql) && Objects.equals(subid, that.subid);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(cdate, estatus, jsondata, strsql, subid, id);
    }
}
